#ifndef _DOCINFOSQLITE_H_
#define _DOCINFOSQLITE_H_

#include "DocInfoDBBase.h"
#include "../sqlite/sqlite3.h"

class DocInfoSqlite: public DocInfoDBBase
{
protected:
    sqlite3    *m_db;
    STRING      m_dbPath;
    int         m_rc;
    char       *m_errMsg;
protected:
    void exeSql(STRING sqlcmd);
public:
    DocInfoSqlite(STRING dpath);
    ~DocInfoSqlite();

    void SaveInfo(const DocInfomation* const info) = 0;
    DocInfomation LoadInfo(STRING name) = 0;

    void CreateDB();
    void LoadDB();
    void ReleaseDB();

    bool IsOK();
};

#endif /* _DOCINFOSQLITE_H_ */
